#ifndef DEBUG_H_
#define DEBUG_H_

#include <fstream>
#include <string>
#include <SDL.h>
#include <SDL_opengl.h>
#include "Asset.h"

class DebugSys
{
private:
	std::ofstream debug; // Debug log file

	inline bool isDebugOpen() { return debug.is_open(); }

	static DebugSys* inst; // Singleton instance

	DebugSys(void);

public:
	~DebugSys(void);

	// Get the instance
	static DebugSys* Inst();
	static DebugSys& GetInst();

	// Log a random line of text
	void Log(int line, std::string file, std::string text);
	void Log(std::string text);

	// Check for library errors
	bool OpenGLDebug();
	bool SDLDebug();
	
	// Debug an asset
	void DebugAsset(Asset *asset);
};

#endif // DEBUG_H_

